package com.xlx.openLink.base;

import com.xlx.openLink.enums.ResultCodeEnum;

/**
 * @author seven
 * @create 2018-11-06 13:38
 **/
public class BaseMessage {

    private String code;
    private String msg;

    public void buildFail(ResultCodeEnum resultCodeEnum) {
        code = resultCodeEnum.getCode();
        msg = resultCodeEnum.getDescription();
    }

    public void buildSuccess(ResultCodeEnum resultCodeEnum) {
        code = resultCodeEnum.getCode();
        msg = resultCodeEnum.getDescription();
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }
}
